﻿using System;
using System.Collections.Generic;
using System.Text;
using WindowsLive.Writer.Api;

namespace InsertObject
{
    public class PluginSettings
    {
        IProperties m_Properties;
        #region Constants
        private const string FILENAME = "FILENAME";
        private const string LABEL = "LABEL";
        private const string LINKTEXT = "LINKTEXT";
        private const string NEWWINDOW = "NEWWINDOW";
        private const string FILENAME2 = "FILENAME2";
        private const string LABEL2 = "LABEL2";
        private const string LINKTEXT2 = "LINKTEXT2";
        private const string NEWWINDOW2 = "NEWWINDOW2";
        private const string FILENAME3 = "FILENAME3";
        private const string LABEL3 = "LABEL3";
        private const string LINKTEXT3 = "LINKTEXT3";
        private const string NEWWINDOW3 = "NEWWINDOW3";
        private const string FTP = "FTP";
        #endregion

        public PluginSettings(IProperties properties)
        {
            m_Properties = properties;
        }

        public string Filename
        {
            get { return m_Properties.GetString(FILENAME, ""); }
            set { m_Properties.SetString(FILENAME, value); }
        }

        public string LinkText
        {
            get { return m_Properties.GetString(LINKTEXT, ""); }
            set { m_Properties.SetString(LINKTEXT, value); }
        }

        public string Label
        {
            get { return m_Properties.GetString(LABEL, ""); }
            set { m_Properties.SetString(LABEL, value); }
        }

        public bool NewWindow
        {
            get { return m_Properties.GetBoolean(NEWWINDOW, true); }
            set { m_Properties.SetBoolean(NEWWINDOW, value); }
        }

        public string Filename2
        {
            get { return m_Properties.GetString(FILENAME2, ""); }
            set { m_Properties.SetString(FILENAME2, value); }
        }

        public string LinkText2
        {
            get { return m_Properties.GetString(LINKTEXT2, ""); }
            set { m_Properties.SetString(LINKTEXT2, value); }
        }

        public string Label2
        {
            get { return m_Properties.GetString(LABEL2, ""); }
            set { m_Properties.SetString(LABEL2, value); }
        }

        public bool NewWindow2
        {
            get { return m_Properties.GetBoolean(NEWWINDOW2, true); }
            set { m_Properties.SetBoolean(NEWWINDOW2, value); }
        }

        public string Filename3
        {
            get { return m_Properties.GetString(FILENAME3, ""); }
            set { m_Properties.SetString(FILENAME3, value); }
        }

        public string LinkText3
        {
            get { return m_Properties.GetString(LINKTEXT3, ""); }
            set { m_Properties.SetString(LINKTEXT3, value); }
        }

        public string Label3
        {
            get { return m_Properties.GetString(LABEL3, ""); }
            set { m_Properties.SetString(LABEL3, value); }
        }

        public bool NewWindow3
        {
            get { return m_Properties.GetBoolean(NEWWINDOW3, true); }
            set { m_Properties.SetBoolean(NEWWINDOW3, value); }
        }

        public bool UseFTP
        {
            get { return m_Properties.GetBoolean(FTP, false); }
            set { m_Properties.SetBoolean(FTP, value); }
        }
    }
}
